package com.njust.RateMyTray_backend.entity;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import lombok.Data;

import java.io.Serializable;
import java.time.LocalDateTime;

@Data
@TableName("t_comment")
public class Comment implements Serializable {

    private static final long serialVersionUID = 1L;

    @TableId(value = "id", type = IdType.AUTO)
    private Long id;

    @TableField("parent_id")
    private Long parentId;

    @TableField("reviewer_id")
    private Long reviewerId;

    @TableField("target_id")
    private Long targetId;

    @TableField("target_type")
    private String targetType;

    private Integer rating;

    private String content;

    @TableField("image_urls")
    private String imageUrls; // JSON string

    private String status;

    @TableField("helpful_count")
    private Integer helpfulCount;

    @TableField("is_anonymous")
    private Boolean isAnonymous;

    @TableField("is_official_reply")
    private Boolean isOfficialReply;

    @TableField("commented_at")
    private LocalDateTime commentedAt;
} 